<%-- 
    Document   : StudentsJSP
    Created on : 24.04.2012, 09:24:07
    Author     : tamara
--%>

<%@page import="model.Cocktail"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="css/main.css">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Cocktail List</title>
    </head>
    <body>
        <div class="container">
            <h1>Cocktail List</h1>

            <INPUT type=button VALUE="back" onClick="history.back()">
            <br/><br/>
            <form name ="forward" action="RecipeManagerServlet">
                <input type="submit" value="select" name="btSubmit"> </input>
            </form>

            <table border="1">
                <tr>
                    <th>Nummer</th>
                    <th>Cocktailname</th>
                </tr>
                <%
                    ArrayList<Cocktail> cocktails = (ArrayList<Cocktail>) request.getAttribute("cocktails");

                    for (Cocktail cocktail : cocktails) {
                        out.println("<tr>");
                        out.println("<th>" + cocktail.getCocktailID() + "</th>");
                        out.println("<th>" + cocktail.getCocktailname() + "</th>");
                    }
                %>
            </table>
        </div>
    </body>
</html>
